package com.four.marketing.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.four.marketing.dao.AllocationDao;
import com.four.marketing.entity.Allocation;
import com.four.marketing.service.AllocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 侯新伟
 * @since 2021-12-14
 */
@Service
public class AllocationServiceImpl extends ServiceImpl<AllocationDao, Allocation> implements AllocationService {

    @Autowired
    private AllocationDao allocationDao;

    /**
     * 秒杀列表
     * @param seName
     * @param allStatus
     * @return
     */
    @Override
    public List <Allocation> allocationList(String seName, String allStatus) {
    return      allocationDao.allocationList(seName,allStatus);

    }

    /**
     * 秒杀删除
     * @param id
     */
    @Override
    public void allocationDelete(Integer id) {
        allocationDao.allocationDelete(id);
    }

    /**
     * 添加秒杀配置
     * @param allocation
     */
    @Override
    public void allocationAdd(Allocation allocation) {
        allocationDao.allocationAdd(allocation);
    }

    @Override
    public void allocationUpdate(Allocation allocation) {
        allocationDao.allocationUpdate(allocation);
    }


}
